using System;
using System.Collections;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;

using WHC.Pager.Entity;
using WHC.Hotel.Entity;

namespace WHC.Hotel.IDAL
{
	/// <summary>
	/// IOrder 的摘要说明。
	/// </summary>
	public interface IOrder : IBaseDAL<OrderInfo>
	{ 
        /// <summary>
        /// 获取当前入住房间的订单信息
        /// </summary>
        /// <param name="roomNo"></param>
        /// <returns></returns>
        OrderInfo GetCurrentOrder(string roomNo);
                        
        /// <summary>
        /// 获取结账单相关的所有订单ID信息
        /// </summary>
        /// <returns></returns>
        List<int> GetRelatedOrderID(string billNumber);

        /// <summary>
        /// 获取一条订单的所有订单信息
        /// </summary>
        /// <param name="roomNo">可以是主房间号，也可以是副房间号</param>
        /// <returns></returns>
        List<OrderInfo> GetRelatedOrders(string roomNo);
                       
        /// <summary>
        /// 获取主从房间的相关房间
        /// </summary>
        /// <param name="roomNo">可以是主房间号，也可以是副房间号</param>
        /// <returns></returns>
        List<string> GetRelatedRooms(string roomNo);
                  
        /// <summary>
        /// 更新订单的结账状态和时间
        /// </summary>
        /// <param name="Id">订单ID</param>
        /// <param name="isCheckOut">是否结账</param>
        /// <param name="checkOutDate">结账时间</param>
        /// <param name="billNumber">结账账单号</param>
        /// <returns></returns>
        bool UpdateCheckOut(int Id, bool isCheckOut, DateTime checkOutDate, string billNumber);

        /// <summary>
        /// 更新订单的结账状态和时间
        /// </summary>
        /// <param name="mainRoomNo">主账单房间</param>
        /// <param name="isCheckOut">是否结账</param>
        /// <param name="checkOutDate">结账时间</param>
        /// <param name="billNumber">结账账单号</param>
        /// <returns></returns>
        bool UpdateCheckOutByMasterRoomNo(string mainRoomNo, bool isCheckOut, DateTime checkOutDate, string billNumber);
                 
                 
        /// <summary>
        /// 更新当前未结帐的原有的主房间为新的主房间号
        /// </summary>
        /// <param name="oldMasterRoomNo"></param>
        /// <param name="newMasterRoomNo"></param>
        void SetRelatedOrderMasterRoom(string oldMasterRoomNo, string newMasterRoomNo);

        /// <summary>
        /// 更新夜审状态
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="AuditDate"></param>
        /// <returns></returns>
        bool UpdateAuditStatus(int Id, DateTime AuditDate);
    }
}